﻿using System;
using System.Data;
using System.IO;
using Csu.Modsim.ModsimModel; 

namespace iwpm.optimization
{
    public class TwoBusSystemInputs
    {
        public HydropowerTarget[] LeftTargets, RightTargets;
        public TimeSeries LeftPowerDeviations, RightPowerDeviations;
        public double HydroObjectiveWeight, MaximumPowerFlow;
        private Model _model; 

        public TwoBusSystemInputs(Model model, HydropowerTarget[] left, HydropowerTarget[] right, string leftPowerDevsFile, string rightPowerDevsFile, double hydroWeight, double maxPowerFlow)
        {
            _model = model;
            LeftTargets = left;
            RightTargets = right;
            LeftPowerDeviations = HydroTargetUpdater.ReadPowerFile(leftPowerDevsFile, model);
            RightPowerDeviations = HydroTargetUpdater.ReadPowerFile(rightPowerDevsFile, model);
            HydroObjectiveWeight = hydroWeight;
            MaximumPowerFlow = maxPowerFlow; 
        }

        public TwoBusSystemInputs(Model model, HydropowerTarget[] left, HydropowerTarget[] right, TimeSeries leftPowerDevs, TimeSeries rightPowerDevs, double hydroWeight, double maxPowerFlow)
        {
            _model = model;
            LeftTargets = left;
            RightTargets = right;
            LeftPowerDeviations = leftPowerDevs;
            RightPowerDeviations = rightPowerDevs;
            HydroObjectiveWeight = hydroWeight;
            MaximumPowerFlow = maxPowerFlow;
        }
    }
}
